package com.qike.baoxiu.enums;

/**
 * 订单类型枚举
 * 类型 0紧急 1一般
 */
public enum KnowledgeTypeEnums {
    SYSTEM                  (0,"系统"),
    HARD                      (1,"硬件"),
    SOFT                      (2,"软件"),
    OTHER                      (3,"其他"),
    ;
    private Integer ecode;

    private String emsg;

    KnowledgeTypeEnums(Integer ecode, String emsg) {
        this.ecode = ecode;
        this.emsg = emsg;
    }

    public Integer getEcode() {
        return ecode;
    }

    public String getEmsg() {
        return emsg;
    }

    public static KnowledgeTypeEnums statOf(Integer ecode) {
        for (KnowledgeTypeEnums state : values())
            if (state.getEcode().equals(ecode))
                return state;
        return null;
    }
}
